home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-18 | 4.0 KB | 209 lines | [TEXT/MPS ] |
- /*
- #
- # Apple Macintosh Developer Technical Support
- #
- # ModalList : Simple Modal Dialog and List Manager Sample Application
- #
- # ModalList.r
- #
- # Copyright © 1989 Apple Computer, Inc.
- # All rights reserved.
- #
- # Versions:
- # 1.00 10/89
- # 1.01 06/92
- #
- # Components:
- # ModalList.make October 1, 1989
- # ModalList.h October 1, 1989
- # ModalList.c October 1, 1989
- # ModalListInit.c June 12, 1992
- # ModalList.r October 1, 1989
- # TCModalList.π June 12, 1992
- # TCModalList.π.rsrc June 12, 1992
- #
- # ModalList is an example application that demonstrates
- # how to use the Dialog Manager and List Manager routines
- # together. It is not a good example of a sample application
- # but a great example of the use of lists in a dialog. The
- # default LDEF is used to display a 2 dimensional list of strings.
- # Each cell's string is initialized to represent it's position in the
- # list. The user can change these strings and search for a particular
- # cell value. Once again this is not meant as an example application and
- # there are some features that are documented in the source listing
- # that you should pay close attention to inorder to understand how
- # this example works.
- #
- */
-
- #include "SysTypes.r"
- #include "Types.r"
-
- #include "ModalList.h"
-
- resource 'vers' (1) {
- 0x01, 0x00, release, 0x00, verUS,
- "1.00",
- "1.00, Copyright © 1989 Apple Computer, Inc."
- };
-
- /* this DLOG and DITL are used to display the list */
-
- resource 'DLOG' (256) {
- {32, 12, 330, 500},
- plainDBox,
- visible,
- goAway,
- 0x0,
- 256,
- "Dialog and List Manager Sample"
- };
-
- resource 'DITL' (256) {
- { /* array DITLarray: 18 elements */
- /* [1] */
- {270, 303, 290, 363},
- Button {
- enabled,
- "OK"
- },
- /* [2] */
- {270, 398, 290, 458},
- Button {
- enabled,
- "Cancel"
- },
- /* [3] OK Outline */
- {270, 303, 290, 363},
- UserItem {
- enabled
- },
- /* [4] List View Rectangle */
- {32, 32, 256, 256},
- UserItem {
- enabled
- },
- /* [5] */
- {31, 289, 51, 396},
- CheckBox {
- enabled,
- "lNoHilite"
- },
- /* [6] */
- {51, 289, 71, 396},
- CheckBox {
- enabled,
- "lUseSense"
- },
- /* [7] */
- {71, 289, 91, 397},
- CheckBox {
- enabled,
- "lNoRect"
- },
- /* [8] */
- {91, 289, 111, 396},
- CheckBox {
- enabled,
- "lNoExtend"
- },
- /* [9] */
- {111, 289, 131, 396},
- CheckBox {
- enabled,
- "lNoDisjoint"
- },
- /* [10] */
- {131, 289, 151, 396},
- CheckBox {
- enabled,
- "lExtendDrag"
- },
- /* [11] */
- {151, 289, 171, 396},
- CheckBox {
- enabled,
- "lOnlyOne"
- },
- /* [12] */
- {194, 292, 213, 467},
- EditText {
- enabled,
- ""
- },
- /* [13] */
- {225, 301, 246, 362},
- Button {
- enabled,
- "Set"
- },
- /* [14] */
- {226, 396, 247, 457},
- Button {
- enabled,
- "Find"
- },
- /* [15] */
- {171, 272, 189, 484},
- StaticText {
- enabled,
- "_____________________________"
- },
- /* [16] */
- {15, 272, 32, 483},
- StaticText {
- enabled,
- "_____________________________"
- },
- /* [17] */
- {249, 272, 265, 483},
- StaticText {
- enabled,
- "_____________________________"
- },
- /* [18] */
- {104, 400, 143, 469},
- StaticText {
- enabled,
- "Selection\n Flags"
- },
-
- /* [19] */
- {8, 64, 22, 256},
- StaticText {
- disabled,
- "ModalList by MacDTS"
- },
- /* [19] */
- {270, 32, 286, 256},
- StaticText {
- disabled,
- "Copyright © 1989 Apple Computer"
- }
- }
- };
-
-
- /* here is the quintessential MultiFinder friendliness device, the SIZE resource */
-
- resource 'SIZE' (-1) {
- dontSaveScreen,
- ignoreSuspendResumeEvents,
- disableOptionSwitch,
- cannotBackground, /* we don't background; we are a modal dialog only */
- multiFinderAware, /* this says we do our own activate/deactivate; don't fake us out */
- backgroundAndForeground, /* this is definitely not a background-only application! */
- dontGetFrontClicks, /* change this is if you want "do first click" behavior like the Finder */
- ignoreChildDiedEvents, /* essentially, I'm not a debugger (sub-launching) */
- not32BitCompatible, /* this app should not be run in 32-bit address space */
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- reserved,
- cPrefSize * 1024,
- cMinSize * 1024
- };
-